package ro.gillardon.commons.dto;

import ro.gillardon.commons.Price;
import ro.gillardon.commons.enums.City;
import ro.gillardon.commons.enums.Currency;
import ro.gillardon.commons.enums.DayType;
import ro.gillardon.commons.enums.RoomType;

public class HotelOfferDTO {
  private String name;
  private City location;
  private DayType dayType;
  private RoomType roomType;
  private Price price;

  public HotelOfferDTO() {
    super();
  }

  public HotelOfferDTO(final String name, final City location, final DayType dayType, final RoomType roomType,
    final Price price) {
    super();
    this.name = name;
    this.location = location;
    this.dayType = dayType;
    this.roomType = roomType;
    this.price = price;
  }

  public String getName() {
    return this.name;
  }

  public void setName(final String name) {
    this.name = name;
  }

  public String getLocation() {
    return this.location.toString();
  }

  public void setLocation(final String location) {
    this.location = City.valueOf(location);
  }

  public String getDayType() {
    return this.dayType.toString();

  }

  public void setDayType(final String dayType) {
    this.dayType = DayType.valueOf(dayType);
  }

  public String getRoomType() {
    return this.roomType.toString();
  }

  public void setRoomType(final String roomType) {
    this.roomType = RoomType.valueOf(roomType);
  }

  public double getPrice() {
    return this.price.getAmount();
  }

  public void setPrice(final double price) {
    this.price = new Price(price, Currency.EUR);
  }

}
